<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>CMS-首页</title>
    <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
    <link rel="stylesheet" type="text/css" href="/static/css/style.css">
</head>
<body>
<div class="box">
    <div class="box-left">
        <div class="middle">
            <img src="/static/img/timg.jpg">
            <div class="f-clear bottom">
                <p class="f-left">加贺香子</p>
                <div class="f-right right"><input type="button" class="xs" value="退出" id="logout"></div>
            </div>
        </div>
        <div class="bottom">
            <ul>
                <li><a href="javascript:void(0)" id="index" class="leftNav active">首页</a></li>
                <li><a href="javascript:void(0)" id="articleList" class="leftNav">文章</a></li>
                <li><a href="javascript:void(0)" id="classifyList" class="leftNav">分类</a></li>
                <li><a href="javascript:void(0)" id="posterList" class="leftNav">广告图</a></li>
            </ul>
        </div>
    </div>
    <div class="box-right">
        <div class="bottom" id="page-content">
            <p class="hy">欢迎您！</p>
        </div>
    </div>
</div>
<script src="/static/js/jquery-3.3.1.min.js"></script>
<script src="/static/js/jquery.form.js"></script>
<script type="text/javascript" src="/static/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/static/ueditor/ueditor.all.min.js"></script>
<script src="/static/js/admin/admin.js"></script>
<script src="/static/js/admin/utils.js"></script>
<script>
    $("#logout").on("click", function () {
        logout();
    });
    $("#articleList").on("click", function () {
        $(".leftNav").each(function () {
            $(this).removeClass("active")
        })
        $(this).addClass("active");
        articleList();
    });
    $("#classifyList").on("click", function () {
        $(".leftNav").each(function () {
            $(this).removeClass("active")
        })
        $(this).addClass("active");
        classifyList();
    });
    $("#index").on("click", function () {
        $(".leftNav").each(function () {
            $(this).removeClass("active")
        })
        $(this).addClass("active");
        $("#page-content").html('<p class="hy">欢迎您！</p>')
    });
    $("#posterList").on("click", function () {
        $(".leftNav").each(function () {
            $(this).removeClass("active")
        })
        $(this).addClass("active");
        posterList();
    });
</script>
</body>
</html>